﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace MovingChameLibrary.Models
{
    public class CommonGroupModel<T> : BindableBase
    {
        #region Constructor
        public CommonGroupModel(int id, String title, CustomObservableCollection<T> items)
        {
            this._id = id;
            this._title = title;
            if (items == null)
                this._items = new CustomObservableCollection<T>();
            else
                this._items = items;
        }
        #endregion

        #region Properties
        private int _id;
        public int Id
        {
            get { return this._id; }
            set { this.SetProperty(ref this._id, value, "Id"); }
        }

        private string _title;
        public string Title
        {
            get { return this._title; }
            set { this.SetProperty(ref this._title, value, "Title"); }
        }

        private CustomObservableCollection<T> _items = new CustomObservableCollection<T>();
        public CustomObservableCollection<T> Items
        {
            get { return this._items; }
            set { this.SetProperty(ref this._items, value, "Items"); }
        }
        #endregion
    }
}
